package com.lhd.qd.module.system.resource.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lhd.qd.module.system.resource.model.dto.ResourcePageQuery;
import com.lhd.qd.module.system.resource.model.dto.ResourceSaveDTO;
import com.lhd.qd.module.system.resource.model.vo.MenuTreeVO;
import com.lhd.qd.module.system.resource.model.vo.ResourceListVO;

import java.util.List;
import java.util.Map;

public interface ResourceService {

    IPage<ResourceListVO> pageResource(ResourcePageQuery query);

    List<MenuTreeVO> getMenuTree();

    ResourceListVO getResourceById(String code);

    boolean saveResource(ResourceSaveDTO saveDTO);

    boolean updateResourceById(String code, ResourceSaveDTO saveDTO);

    boolean removeResourceById(String code);

    List<MenuTreeVO> getMenuListByRoleId(Long roleId);

    String[] getOperatePermissionListByRoleId(Long roleId);

    Map<String, String[]> getOperatePermissionListWithMenuByRoleId(Long roleId);
}
